package com.zisuyi.game.sdk.game

import androidx.appcompat.app.AppCompatActivity
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.viewbinding.ViewBinding
import com.weilele.mvvm.base.helper.ignoreErrorToast
import com.weilele.mvvm.utils.activity.navigateTo
import com.zisuyi.game.sdk.base.BaseActivity

class GameActivity : BaseActivity<ViewBinding>() {
    companion object {
        fun start(appCompatActivity: AppCompatActivity?) {
            appCompatActivity?.navigateTo<GameActivity>()
        }
    }

    private val gameEgret by lazy { GameEgret(this) }

    override fun getLayoutResOrView(inflater: LayoutInflater, parent: ViewGroup?): Any? {
        return ignoreErrorToast { gameEgret.rootFrameLayout }
    }

    override fun onBackPressed() {
        gameEgret.onBackPressed()
//        super.onBackPressed()
    }
}